package com.whd.DIP;

import com.whd.DIP.achieve.Cat;
import com.whd.DIP.achieve.Dog;
import com.whd.DIP.achieve.Tiger;

/**
 * @author whd
 * @date 2024/07/19 15:22:58
 */
public class Demo {
    public static void main(String[] args) {
        People people = new People();
        Animal animal1 =new Cat("李六");
        Animal animal2 =new Dog("王五");
        Animal animal3 =new Tiger("赵四");

        people.setName("张三");
        people.setAnimal(animal1);
        people.feet("炸鸡");
        people.show();
        people.setAnimal(animal2);
        people.show();
        people.feet("烧烤");
        people.setAnimal(animal3);
        people.show();
        people.feet("吃什么");
    }
}
